package y23.Oct;



public class MyThread1 extends Thread{
    public void run() {
        while (true) {
            System.out.println("Thread");
            try {
                sleep(100);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }


    }

    public static void main(String[] args) {
        Thread thread = new MyThread1();
        thread.start();
        while (true){
            System.out.println("main");
            try {
                sleep(100);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
